#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""  
@Project : pythonProject
@File : login.py
@Author : 万能小魏
@Time : 2024/8/16 14:32  
@脚本说明 : 

"""
import woniu.dataList as dataList
import woniu.menu as menu
def login():
    username = input("请输出您的账号:\n")
    passwd = input("请输出您的密码:\n")
    tempList = list(filter(lambda u: u['username'] == username and u['password'] == passwd and u['status'], dataList.userList))
    if len(tempList) == 0:
        print("登录失败！账号或者密码不正确！")
    else:
        print("欢迎", tempList[0]["username"], "使用本系统!")
        menu.ermain()